﻿using Newtonsoft.Json;
using ShanNiang.Hosting.Common;
using ShanNiang.Hosting.Enumerate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.LoginModels.Requests
{
    /// <summary>
    /// 发送短信请求
    /// </summary>
    public class SendSmsRequest : RequestBase
    {

        public SendSmsRequest(string phoneNumber,bool testing=false)
        {
            PhoneNumber = phoneNumber;
            Testing = testing;
        }
        /// <summary>
        /// 手机号
        /// </summary>
        public string PhoneNumber { get; set; }
        /// <summary>
        /// 测试
        /// </summary>
        public bool Testing { get; set; }


        /// <summary>
        /// 请求路径
        /// </summary>
        [JsonIgnore]
        [System.Text.Json.Serialization.JsonInclude]
        protected override string RequestPath => "/api/AppGrant/SendSMSCode";
        /// <summary>
        /// 请求方法
        /// </summary>
        [JsonIgnore]
        [System.Text.Json.Serialization.JsonInclude]
        public override HttpMethod Method => HttpMethod.Post;
        /// <summary>
        /// 需要令牌
        /// </summary>
        [JsonIgnore]
        [System.Text.Json.Serialization.JsonInclude]
        public override bool NeedToken => false;
        /// <summary>
        /// Api服务器
        /// </summary>
        [JsonIgnore]
        [System.Text.Json.Serialization.JsonInclude]
        public override ApiServer ApiServer => ApiServer.IdsServer;
    }
}
